import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { RechargeLogService } from './recharge-log.service';
import { CreateRechargeLogDto } from './dto/create-recharge-log.dto';
import { UpdateRechargeLogDto } from './dto/update-recharge-log.dto';

@Controller('recharge-log')
export class RechargeLogController {
  constructor(private readonly rechargeLogService: RechargeLogService) {}

  @Post()
  create(@Body() createRechargeLogDto: CreateRechargeLogDto) {
    return this.rechargeLogService.create(createRechargeLogDto);
  }

  @Get()
  findAll() {
    return this.rechargeLogService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.rechargeLogService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateRechargeLogDto: UpdateRechargeLogDto) {
    return this.rechargeLogService.update(+id, updateRechargeLogDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.rechargeLogService.remove(+id);
  }
}
